﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ChatDAL;

namespace ChatService
{
    public class ChannelDTO
    {
        public string Name { get; set; }
        public int ID { get; set; }

        public static ChannelDTO ConvertFrom(Channel channel)
        {
            ChannelDTO converted = new ChannelDTO();
            converted.Name = channel.Name;
            converted.ID = channel.ChannelID;
            return converted;
        }

        public Channel ConvertToChannel()
        {
            Channel channel = new Channel();
            channel.Name = this.Name;
            channel.ChannelID = this.ID;

            return channel;
        }
    }


}